FIG. 16 illustrates a semiconductor sensor 1 disclosed in JP-A-2005-203431. The semiconductor sensor 1 is used to detect alcohol concentration. The semiconductor sensor 1 includes a semiconductor element 2 bonded on a die pad 3 of a lead frame. Bonding pads (not shown) located around the perimeter of a front surface of the semiconductor element 2 are electrically connected via bonding wires to lead fingers of the lead frame. The semiconductor element 2 is encapsulated with a molding resin layer 4 having an opening 4a. An alcohol concentration detection portion 2a is located in the center of the front surface of the semiconductor element 2 and exposed outside the molding resin layer 4 through the opening 4a. 
The semiconductor element 2 is encapsulated with the molding resin layer 4 by the following method. The semiconductor element 2 bonded on the lead frame is placed in a mold, and then liquid (or gelled) resin is injected into the mold and hardened. An upper part of the mold is provided with a projection portion that is positioned in the center of the front surface of the semiconductor element 2. Thus, the projection portion causes the molding resin layer 4 to have the opening 4a. Alternatively, as disclosed in Japanese Patent No. 2598161, the opening 4a can be formed by arranging tube-shaped objects between the upper part of the mold and the front surface of the semiconductor element 2 so that the resin can be prevented by the tube-shaped objects from entering space between the upper part of the mold and the front surface of the semiconductor element 2.
When the semiconductor sensor 1 is used in a vehicle, the semiconductor sensor 1 is subjected to severe environmental conditions, which can corrode and degrade the semiconductor sensor 1. For example, the semiconductor sensor 1 is exposed to vibration, moisture, fuel, oil, acid, alkali, and the like. Further, a temperature in the vehicle ranges from minus several tens of degrees Celsius (e.g., −40° C.) to one hundred and several tens of degrees Celsius (e.g., 150° C.). Therefore, the semiconductor sensor 1 is exposed to a repeated thermal cycle.
The repeated thermal cycle can cause the semiconductor sensor 1 to be warped due to differences in coefficients of thermal expansion between the semiconductor element 2, the die pad 3, and the molding resin layer 14. When the semiconductor sensor 1 is warped, it is likely that the molding resin layer 4 is cracked or peeled off from the front surface of the semiconductor element 2 around the opening 4a, as indicated by arrows in FIG. 16.
Further, the severe environmental conditions can advance (i.e., worsen) the crack or the peel of the molding resin layer 4. If the crack or the peel of the molding resin layer 4 is advanced to the electrode pads of the semiconductor element 2, the electrode pads are corroded, and the bonding wires are damaged. As a result, the semiconductor element 2 is electrically disconnected from the lead frame so that the semiconductor sensor 1 can be broken.